package net.techfuser.channelorderreport.summary;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description:
 * @Author 左龙龙
 * @Date 21-5-27
 * @Version 1.0
 **/
public class OrderOplog {
    List<Summary> observers = new ArrayList();

    public void addObserver(Summary summary){
        observers.add(summary);
    }

    public void removeObjserver(Summary summary){
        observers.remove(summary);
    }

    public void notifyObserver(JSONObject order){
        for(Summary summary : observers){
            summary.summary(order);
        }
    }
}
